#! /bin/bash
HIVE_HOME=/usr/bin/hive


${HIVE_HOME} -S -e "
create table zx_dws.dws_num_attend
(
    class_date             string,
    course_class_id        int,
    morning_num_attend     bigint,
    morning_late_num       bigint,
    afternoon_num_attend   bigint,
    afternoon_late_num     bigint,
    evening_num_attend     bigint,
    evening_late_num       bigint
)
row format delimited
fields terminated by '/t'
stored as orc
tblproperties ('orc.compress'='SNAPPY');


create table zx_dws.dws_leave_apply
(
    class_date              string,
    course_class_id         int,
    morning_leave_count     bigint,
    afternoon_leave_count   bigint,
    evening_leave_count     bigint
)
row format delimited
fields terminated by '/t'
stored as orc
tblproperties ('orc.compress'='SNAPPY');



create table zx_dws.dws_class_truant
(
    class_date               string,
    course_class_id          int,
    morning_truant_count     bigint,
    afternoon_truant_count   bigint,
    evening_truant_count     bigint
)
row format delimited
fields terminated by '/t'
stored as orc
tblproperties ('orc.compress'='SNAPPY');

